package com.rc.evcharger.common.type;

import java.lang.reflect.Field;

public class RemoteUpdate extends BaseType implements DataType {

    //以下是数据域
    String host;  //ip  FTP服务器上的信息
    String port; //端口号
    String user; //用户
    String rPassword; //密码
    String fileName; //远程升级的文件名 .bin后缀
    String filePath; //文件路劲
    String startType; //启动类型：1:立即升级，2：空闲升级，3：断电升级;
    String obligate = "00 00 00 00";

    RemoteUpdate() {
        super();
    }

    public RemoteUpdate(String measuringPoint, String permisson, String password, String host, String port, String user,
                        String rPassword, String fileName, String startType, String filePath) {
        super();
        this.host = host;
        this.port = port;
        this.user = user;
        this.rPassword = rPassword;
        this.fileName = fileName;
        this.startType = startType;
        this.filePath = filePath;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getrPassword() {
        return rPassword;
    }

    public void setrPassword(String rPassword) {
        this.rPassword = rPassword;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getStartType() {
        return startType;
    }

    public void setStartType(String startType) {
        this.startType = startType;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getObligate() {
        return obligate;
    }

    public void setObligate(String obligate) {
        this.obligate = obligate;
    }

    @Override
    public String toString() {
        return "RemoteUpdate{" +
                "host='" + host + '\'' +
                ", port='" + port + '\'' +
                ", user='" + user + '\'' +
                ", rPassword='" + rPassword + '\'' +
                ", fileName='" + fileName + '\'' +
                ", filePath='" + filePath + '\'' +
                ", startType='" + startType + '\'' +
                '}';
    }

    @Override
    public boolean customField(Field field, StringBuffer sb) {
        return false;
    }
}
